#ifndef AXISCONTROLWIDGET_H
#define AXISCONTROLWIDGET_H

#include <QWidget>
#include <QApplication>
#include <QDomDocument>
#include <QFile>
#include <QTableWidget>
#include <qtablewidget.h>
#include <QHeaderView>
#include <QGridLayout>
#include <QPushButton>
#include <QDebug>
#include <qcombobox.h>
#include <QLabel>
#include <QMessageBox>
#include <QLineEdit>
#include <QButtonGroup>
#include "define.h"
#include "capcontroldefine.h"

class QAxisWorkModeWidget : public QWidget
{
    Q_OBJECT
public:
    explicit QAxisWorkModeWidget(int i32AixsNo,QWidget *parent = nullptr);

    void showRcvdata11(_loopdata_11 rcvdata11);

signals:
    void signal_setparam(int i32Aixs,int cmdid,int i32value,int datalen);

public slots:

    void onProcessParamButtonClick();

private:

    void InitUI();

    void InitParamConfig();

    float cacldata(st_cmd_attr cmd);

    QWidget* createProcessWidget();//操作


    void setButtonStyleSheet(QPushButton* pBtn);


    QTableWidget* _pProcessWidget;

    QPushButton* _pMotorEnableButton;
    QPushButton* _pMotorDisEnableButton;

    QButtonGroup* _pMotorEnableBtnGroup;

    QMap<int,st_cmd_attr> _processcmdMap;

    int _i32AixsNo;//轴编号

    _loopdata_11 _rcvdata_11;
    _loopdata_55 _rcvdata_55;

    int _i32FrameCnt;


};

#endif // AXISCONTROLWIDGET_H
